//
//  NSString+GetDirectory.m
//  获取沙盒路径
//
//  Created by 徐攀 on 16/4/8.
//  Copyright © 2016年 徐攀. All rights reserved.
//

#import "NSString+GetDirectory.h"

@implementation NSString (GetDirectory)

- (instancetype)appendDocumentPath {
    
    return [[NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES) lastObject]
            stringByAppendingPathComponent:self.lastPathComponent];
    
}
- (instancetype)appendcachesPath {
    return [[NSSearchPathForDirectoriesInDomains(NSCachesDirectory, NSUserDomainMask, YES) lastObject]
            stringByAppendingPathComponent:self.lastPathComponent];
}
- (instancetype)appendTempPath {
    return [NSTemporaryDirectory() stringByAppendingPathComponent:self.lastPathComponent];
}

@end
